package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.SocialPracticePic;
import com.srzk.youthleagueback.pojo.ThematicPic;
import com.srzk.youthleagueback.pojo.VolunteerPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface VolunteerPicMapper {

    @Insert("insert into volunteer_pic (id,picture)" +
            "values (#{volunteer_pic.id}, #{volunteer_pic.picture})")
    int insert(@Param("volunteer_pic") VolunteerPic record);

    @Select("SELECT * FROM volunteer_pic WHERE id = #{id}")
    List<VolunteerPic> selectByPrimaryKeyList(Long id);

    List<ThematicPic> selectAll();

    @Delete("DELETE FROM volunteer_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);
}